package org.lex.filter;

import java.util.Iterator;

public class OrFilter<T> extends AbstractMultipleFilter<T> {
	public OrFilter(Filter<T>... filters) {
		super(filters);
	}

	public OrFilter(Iterator<Filter<T>> filters) {
		super(filters);
	}

	public boolean accept(T o) {
		if (null == o)
			return false;
		for (int i = 0; i < this.filters.size(); i++)
			if (true == this.filters.get(i).accept(o))
				return true;
		return false;
	}
}
